# coding: utf-8
from components import Alert


def check_result(result: dict):
    retcode = result.get('retcode')
    if retcode != 0:
        Alert.error(result.get('errmsg'))
        return False
    return result.get('data', None)
